<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <body>

        <ui:composition template="./../../../WEB-INF/templates/noFooterCompanyTemplate.xhtml">

            <ui:define name="content">
                <h:form id="createSearchForm" styleClass="headerPanelGrid">
                    <p:growl id="searchGrowl" showDetail="false"></p:growl>
                    <p:remoteCommand autoRun='true' update=':createSearchForm:numberDisplayPanel' process="@this" actionListener="#{createSearchBean.updateNumberOfValidCandidates()}"></p:remoteCommand>
                    <p:panel header="#{messages.NewSearch}" styleClass="newSearchPanel noPaddingTitle noMargin noPadding noBorder">
                        <h:outputText styleClass="bodyText marginBottom20 block" value="#{messages.NewSearchTip}"></h:outputText>
                        <p:panel id="numberDisplayPanel" styleClass="newSearchNumberColumn">
                            <div class="viewCandidateColumnTitle imageBackgroundButton">
                                <span>#{messages.ValidCandidates}</span>
                            </div>
                            <div>
                            <h:outputText style="display:inline-block;margin-top:25px;" styleClass="bodyText" value="#{createSearchBean.numberOfCandidates == null ? '' : messages.WithCurrentRequerimentsText} "></h:outputText>
                            <h:outputText style="display:inline-block;margin-left: 0.5em;margin-right: 0.5em;font-weight:bold!important;" styleClass="headerText" value="#{createSearchBean.numberOfCandidates == null ? 'Cargando' : createSearchBean.numberOfCandidates} "></h:outputText>
                            <h:outputText style="display:inline-block;margin-bottom:25px!important;" styleClass="bodyText" value="#{createSearchBean.numberOfCandidates == null ? '' : messages.WithCurrentRequerimentsSecondText}"></h:outputText>
                            </div>
                            <p:dataGrid rendered="#{createSearchBean.previewCandidates!=null}" styleClass="noBorder noMargin noPadding previewSerchDataGrid" emptyMessage="" id="facesDataGrid" var="candidate" value="#{createSearchBean.previewCandidates}" columns="2" rows="#{createSearchBean.previewCandidates.size()}" paginator="false" >
                                <p:column styleClass="facesColumn noPadding noMargin noBorder">
                                    <p:panel style="margin-left: 4px;" id="hola" styleClass="noPadding noBorder polaroidBackground rotate#{polaroidBean.randomRotation}">  
                                        <h:panelGrid columns="1" styleClass="noMargin noPadding noBorder facesPanel">  
                                            <h:graphicImage rendered="#{candidate.bustBlackWhite==null}" styleClass="imagenBusqueda" library="images" name="bustnotavailable.jpg"></h:graphicImage>                            
                                            <h:graphicImage rendered="#{candidate.bustBlackWhite!=null}" styleClass="imagenBusqueda" value="/candidateFiles/#{candidate.idCandidate.toString()}/images/#{candidate.bustBlackWhite}"></h:graphicImage>                            
                                            <h:outputText style="font-size:10px;" styleClass="polaroidText" value="#{candidate.name}"></h:outputText>
                                        </h:panelGrid>  
                                    </p:panel> 
                                </p:column>
                            </p:dataGrid> 
                            <p:commandButton style="margin-top: 30px;" styleClass="cropButton imageBackgroundButton" value="#{messages.ContinueSearching}" update=":createSearchForm:searchGrowl" id="ajax" action="#{createSearchBean.createSearch}" />                        
                        </p:panel>
                        
                        <p:panel styleClass="newSearchBasicColumn noMargin noPadding noBorder">
                            <div class="viewCandidateColumnTitle personalBackgroundButton">
                                <span>#{messages.BasicSearch}</span>
                            </div>
                            <p:panel id="basicSearchPanel" styleClass="noBorder noPadding noMargin">
                                <h:outputText styleClass="bodyText createSearchTip" value="#{messages.BasicSearchTip}"></h:outputText>
                                <p:panelGrid style="margin-top: 16px" styleClass="noMargin noPadding noBorder noSidePaddingCell floatLeft" columns="1">  
                                    <p:inputText id="searchDescription" value="#{createSearchBean.search.description}" required="true" requiredMessage="#{messages.NameRequired}" label="#{messages.Name}">  
                                        <p:ajax event="change" update=":createSearchForm:searchGrowl" />
                                    </p:inputText>
                                    <p:watermark for="searchDescription" value="#{messages.SearchName}" />
                                    
                                    <h:panelGroup>
                                        <p:selectOneMenu converter="#{companyFolderConverter}" id="selectCompanyFolder" value="#{createSearchBean.search.folder}" effect="fade" required="false" label="#{messages.SearchFolder}" requiredMessage="#{messages.SexRequired}">  
                                            <f:selectItem itemLabel="#{messages.CreateNewFolder}" itemValue="" />  
                                            <f:selectItems value="#{createSearchBean.company.companyFolderList}" var="companyFolder" itemLabel="#{companyFolder.description}" itemValue="#{companyFolder}"/>  
                                        </p:selectOneMenu>
                                        <p:tooltip styleClass="searchTooltip" for="selectCompanyFolder" showEvent="click" value="#{messages.SelectSearchFolderTooltip}" hideEvent="mouseout" />
                                    </h:panelGroup>
                                    
                                    <h:panelGroup>
                                        <p:selectOneMenu id="selectIsVisible" value="#{createSearchBean.search.isPublic}" effect="fade" required="false" label="#{messages.IsPublic}" requiredMessage="#{messages.SexRequired}">  
                                            <f:selectItem itemLabel="#{messages.IsPublic}" itemValue="#{false}" />
                                            <f:selectItem itemLabel="#{messages.Yes}" itemValue="#{true}" />  
                                            <f:selectItem itemLabel="#{messages.No}" itemValue="#{false}" />
                                        </p:selectOneMenu>
                                        <p:tooltip styleClass="searchTooltip" for="selectIsVisible" showEvent="click" value="#{messages.SelectIsPublicTooltip}" hideEvent="mouseout" />
                                    </h:panelGroup>
                                    
                                    <p:selectOneMenu converter="#{sexConverter}" id="selectSearchSex" value="#{createSearchBean.search.sex}" effect="fade" required="false" label="#{messages.Sex}" requiredMessage="#{messages.SexRequired}">  
                                        <f:selectItem itemLabel="#{messages.Sex}" itemValue="" />  
                                        <f:selectItem itemLabel="#{messages.Indiferent}" itemValue="" /> 
                                        <f:selectItems value="#{userResourcesBean.sexs}" var="sex" itemLabel="#{sexBundle[sex.idSex.toString()]}" itemValue="#{sex}"/>  
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                    </p:selectOneMenu>

                                    <p:inputText id="minimumAge" value="#{createSearchBean.search.minimumAge}" required="false" label="#{messages.Name}">  
                                        <f:convertNumber integerOnly="true" maxIntegerDigits="2" minIntegerDigits="2"></f:convertNumber>
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                    </p:inputText>
                                    <p:watermark for="minimumAge" value="#{messages.MinimumAge}" />

                                    <p:inputText id="maximumAge" value="#{createSearchBean.search.maximumAge}" required="false" label="#{messages.Name}">  
                                        <f:convertNumber integerOnly="true" maxIntegerDigits="2" minIntegerDigits="2"></f:convertNumber>
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                    </p:inputText>
                                    <p:watermark for="maximumAge" value="#{messages.MaximumAge}" />

                                    <p:selectOneMenu filter="true" filterMatchMode="contains" converter="#{countryConverter}" id="selectCountry" value="#{createSearchBean.search.offerCountry}" effect="fade" required="false" label="#{messages.Country}" requiredMessage="#{messages.CountryRequired}">  
                                        <f:selectItem itemLabel="#{messages.OfferCountry}" itemValue="" />
                                        <f:selectItem itemLabel="#{countryBundle[resourcesBean.spain.idCountry.toString()]}" itemValue="#{resourcesBean.spain}" /> 
                                        <f:selectItems value="#{userResourcesBean.countries}" var="country" itemLabel="#{countryBundle[country.idCountry.toString()]}" itemValue="#{country}"/>  
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="selectProvince :createSearchForm:numberDisplayPanel" />
                                    </p:selectOneMenu>

                                    <p:selectOneMenu filter="true" filterMatchMode="contains" converter="#{provinceConverter}" id="selectProvince" value="#{createSearchBean.search.offerProvince}" effect="fade" required="false" label="#{messages.Province}" requiredMessage="#{messages.ProvinceRequired}">  
                                        <f:selectItem itemLabel="#{messages.AnyProvince}" itemValue="" /> 
                                        <f:selectItem itemLabel="#{messages.Indiferent}" itemValue="" /> 
                                        <f:selectItems value="#{createSearchBean.search.offerCountry.provinceList}" var="province" itemLabel="#{province.description}" itemValue="#{province}"/>  
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                    </p:selectOneMenu>

                                    <p:selectOneMenu filter="true" filterMatchMode="contains" converter="#{sectorConverter}" id="selectBasicProfessionalSector" value="#{createSearchBean.search.professionalInfoSector}" effect="fade" required="false" label="#{messages.ExperienceInSector}" requiredMessage="#{messages.ProvinceRequired}">  
                                        <f:selectItem itemLabel="#{messages.ExperienceInSector}" itemValue="" />  
                                        <f:selectItem itemLabel="#{messages.Indiferent}" itemValue="" /> 
                                        <f:selectItems value="#{userResourcesBean.sectors}" var="basicProfessionalSector" itemLabel="#{sectorBundle[basicProfessionalSector.idSector.toString()]}" itemValue="#{basicProfessionalSector}"/>  
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                    </p:selectOneMenu>

                                    <p:selectOneMenu converter="#{jobDurationConverter}" id="selectBasicMinimumJobDuration" value="#{createSearchBean.search.professionalInfoMinimumJobDuration}" effect="fade" required="false" label="#{messages.MinimumJobDuration}" requiredMessage="#{messages.ProvinceRequired}">  
                                        <f:selectItem itemLabel="#{messages.MinimumJobDuration}" itemValue="" />  
                                        <f:selectItem itemLabel="#{messages.Indiferent}" itemValue="" /> 
                                        <f:selectItems value="#{userResourcesBean.jobDurations}" var="basicMinimumJobDuration" itemLabel="#{jobDurationBundle[basicMinimumJobDuration.idJobDuration.toString()]}" itemValue="#{basicMinimumJobDuration}"/>  
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                    </p:selectOneMenu>

                                    <p:selectOneMenu required="false" requiredMessage="#{messages.EducationalLevelRequired}" converter="#{educationalLevelConverter}" id="selectBasicMinimumEducationalLevel" value="#{createSearchBean.search.educationalInfoMinimumEducationalLevel}" effect="fade" label="#{messages.EducationalLevel}">  
                                        <f:selectItem itemLabel="#{messages.MinimumEducationalLevel}" itemValue="" />  
                                        <f:selectItem itemLabel="#{messages.Indiferent}" itemValue="" /> 
                                        <f:selectItems value="#{userResourcesBean.educationalLevels}" var="basicMinimumEducationalLevel" itemLabel="#{educationalLevelBundle[basicMinimumEducationalLevel.idEducationalLevel.toString()]}" itemValue="#{basicMinimumEducationalLevel}"/>  
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="basicSearchPanel :createSearchForm:numberDisplayPanel"/>  
                                    </p:selectOneMenu>

                                    <p:selectOneMenu rendered="#{createSearchBean.search.educationalInfoMinimumEducationalLevel.educationalValue>'2'}" converter="#{sectorConverter}" id="selectBasicEducationalSector" value="#{createSearchBean.search.educationalInfoSector}" effect="fade" label="#{messages.Sector}">  
                                        <f:selectItem itemLabel="#{messages.StudiesSector}" itemValue="" />  
                                        <f:selectItem itemLabel="#{messages.Indiferent}" itemValue="" /> 
                                        <f:selectItems value="#{userResourcesBean.sectors}" var="basicEducationalSector" itemLabel="#{sectorBundle[basicEducationalSector.idEducationalSector.toString()]}" itemValue="#{basicEducationalSector}"/>  
                                        <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel"/>  
                                    </p:selectOneMenu>
                                </p:panelGrid>
                            </p:panel>
                        </p:panel>
                        
                        
                        <p:panel styleClass="newSearchAdvancedColumn noMargin noPadding noBorder">
                            <div class="viewCandidateColumnTitle greyBackgroundButton">
                                <span>#{messages.AdvancedSearch}</span>
                            </div>
                            <h:outputText styleClass="bodyText createSearchTip" value="#{messages.AdvancedSearchTip}"></h:outputText>
                            <p:panel id="botoneraPanel" styleClass="newSearchBotoneraPanel noMargin noPadding noBorder">
                                <p:commandLink  onclick="editTabView.select(1)" oncomplete="PrimeFaces.scrollTo('createSearchForm:createSearchAccordionPanel');" styleClass="personalIcon newSearchAdvancedIcon">
                                    <h:outputText styleClass="editIconText" value="#{messages.Personal}"></h:outputText>
                                </p:commandLink>
                                <p:commandLink onclick="editTabView.select(3)" oncomplete="PrimeFaces.scrollTo('createSearchForm:createSearchAccordionPanel');" styleClass="professionalIcon newSearchAdvancedIcon iconMarginBottom">
                                    <h:outputText styleClass="editIconText" value="#{messages.Professional}"></h:outputText>
                                </p:commandLink>
                                <p:commandLink onclick="editTabView.select(4)" oncomplete="PrimeFaces.scrollTo('createSearchForm:createSearchAccordionPanel');" styleClass="educationalIcon newSearchAdvancedIcon newSearchAdvancedIconNoMarginRight iconMarginBottom">
                                    <h:outputText styleClass="editIconText" value="#{messages.Educational}"></h:outputText>
                                </p:commandLink>
                                <p:commandLink onclick="editTabView.select(2)" oncomplete="PrimeFaces.scrollTo('createSearchForm:createSearchAccordionPanel');" styleClass="languageIcon newSearchAdvancedIcon">
                                    <h:outputText styleClass="editIconText" value="#{messages.Language}"></h:outputText>
                                </p:commandLink>
                                <p:commandLink onclick="editTabView.select(5)" oncomplete="PrimeFaces.scrollTo('createSearchForm:createSearchAccordionPanel');" styleClass="relocatingIcon newSearchAdvancedIcon">
                                    <h:outputText styleClass="editIconText" value="#{messages.Relocating}"></h:outputText>
                                </p:commandLink>
                                <p:commandLink onclick="editTabView.select(6)" oncomplete="PrimeFaces.scrollTo('createSearchForm:createSearchAccordionPanel');" styleClass="interestIcon newSearchAdvancedIcon newSearchAdvancedIconNoMarginRight">
                                    <h:outputText styleClass="editIconText" value="#{messages.Interest}"></h:outputText>
                                </p:commandLink>
                            </p:panel>
                            
                            
                            <p:tabView id="createSearchAccordionPanel" effect="fade" effectDuration="fast" widgetVar="editTabView" styleClass="advancedSearchTabView tabView noMargin noPadding noBorder">
                                <p:tab>
                                    <h:outputText value="" styleClass="bodyText"></h:outputText>
                                </p:tab>
                                <p:tab id="advancedPersonalTab" title="#{messages.PersonalRequeriments}">
                                    <p:panel id="advancedPersonalPanel" styleClass="createCandidatePanel">
                                        <p:panelGrid styleClass="createCandidatePanelGrid" columns="1">
                                            <p:selectOneMenu filter="true" filterMatchMode="contains" converter="#{countryConverter}" id="selectResidenceCountry" value="#{createSearchBean.search.residenceCountry}" effect="fade" required="false" label="#{messages.Country}" requiredMessage="#{messages.CountryRequired}">  
                                                <f:selectItem itemLabel="#{messages.Country}" itemValue="" />  
                                                <f:selectItem itemLabel="#{countryBundle[resourcesBean.spain.idCountry.toString()]}" itemValue="#{resourcesBean.spain}" /> 
                                                <f:selectItems value="#{userResourcesBean.countries}" var="residenceCountry" itemLabel="#{countryBundle[residenceCountry.idCountry.toString()]}" itemValue="#{residenceCountry}"/>  
                                                <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="selectResidenceProvince selectResidenceTown :createSearchForm:numberDisplayPanel" />
                                            </p:selectOneMenu>

                                            <p:selectOneMenu filter="true" filterMatchMode="contains" converter="#{provinceConverter}" id="selectResidenceProvince" value="#{createSearchBean.search.residenceProvince}" effect="fade" required="false" label="#{messages.Province}" requiredMessage="#{messages.ProvinceRequired}">  
                                                <f:selectItem itemLabel="#{messages.Province}" itemValue="" />  
                                                <f:selectItems value="#{createSearchBean.search.residenceCountry.provinceList}" var="residenceProvince" itemLabel="#{residenceProvince.description}" itemValue="#{residenceProvince}"/>  
                                                <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="selectResidenceTown :createSearchForm:numberDisplayPanel" />
                                            </p:selectOneMenu>

                                            <p:selectOneMenu filter="true" filterMatchMode="contains" converter="#{townConverter}" id="selectResidenceTown" value="#{createSearchBean.search.residenceTown}" effect="fade" required="false" label="#{messages.Town}" requiredMessage="#{messages.TownRequired}">  
                                                <f:selectItem itemLabel="#{messages.Town}" itemValue="" />  
                                                <f:selectItems value="#{createSearchBean.search.residenceProvince.townList}" var="residenceTown" itemLabel="#{residenceTown.description}" itemValue="#{residenceTown}"/>  
                                                <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                            </p:selectOneMenu>

                                            <p:selectOneMenu converter="#{timeAvailabilityConverter}" id="selectMinimumTimeAvailability" value="#{createSearchBean.search.minimumTimeAvailability}" effect="fade" required="false" label="#{messages.TimeAvailability}" requiredMessage="#{messages.TimeAvailabilityRequired}">  
                                                <f:selectItem itemLabel="#{messages.MinimumTimeAvailability}" itemValue="" />  
                                                <f:selectItems value="#{userResourcesBean.timeAvailabilities}" var="minimumTimeAvailability" itemLabel="#{timeAvailabilityBundle[minimumTimeAvailability.idTimeAvailability.toString()]}" itemValue="#{minimumTimeAvailability}"/>  
                                                <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                            </p:selectOneMenu>

                                            <p:selectOneMenu id="selectRequiredVehicle" value="#{createSearchBean.search.requiredVehicle}" effect="fade" required="false" label="#{messages.OwnVehicle}" requiredMessage="#{messages.OwnVehicleRequired}">  
                                                <f:selectItem itemLabel="#{messages.RequiredVehicle}" itemValue="#{false}" />
                                                <f:selectItem itemLabel="#{messages.Yes}" itemValue="#{true}" />
                                                <f:selectItem itemLabel="#{messages.No}" itemValue="#{false}" />
                                                <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update=":createSearchForm:numberDisplayPanel" />
                                            </p:selectOneMenu>
                                        </p:panelGrid>
                                    </p:panel>
                                </p:tab>

                                <p:tab id="advancedLanguageTab" title="#{messages.LanguageRequeriments}">
                                    <p:accordionPanel activeIndex="false" id="advancedLanguageAccordionPanel">
                                        <p:tab titleStyleClass="languageBackgroundButton advancedOptionTab" id="languageOrOperatorTab" title="#{messages.OrOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedLanguageOrPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedLanguageOrPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.LanguageRequired}" converter="#{languageConverter}" id="selectOrLanguage" value="#{createSearchBean.languageOrCollector.language}" effect="fade" label="#{messages.Language}">  
                                                            <f:selectItem itemLabel="#{messages.Language}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.languages}" var="languageOr" itemLabel="#{languageBundle[languageOr.idLanguage.toString()]}" itemValue="#{languageOr}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" process="@this" update="advancedLanguageOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu required="false" requiredMessage="#{messages.LanguageLevelRequired}" converter="#{languageLevelConverter}" id="selectMinimumOrLanguageLevel" value="#{createSearchBean.languageOrCollector.minimumLanguageLevel}" effect="fade" label="#{messages.LanguageLevel}">  
                                                            <f:selectItem itemLabel="#{messages.MinimumLanguageLevel}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.languageLevels}" var="minimumOrLanguageLevel" itemLabel="#{languageLevelBundle[minimumOrLanguageLevel.idLanguageLevel.toString()]}" itemValue="#{minimumOrLanguageLevel}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" process="@this" update="advancedLanguageOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu id="selectOrRequiredVideo" value="#{createSearchBean.languageOrCollector.requiredVideo}" effect="fade" required="false" label="#{messages.RequiredVideo}" requiredMessage="#{messages.RequiredVideo}">  
                                                            <f:selectItem itemLabel="#{messages.RequiredVideo}" itemValue="#{null}" />
                                                            <f:selectItem itemLabel="#{messages.Yes}" itemValue="#{true}" />
                                                            <f:selectItem itemLabel="#{messages.No}" itemValue="#{false}" />
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedLanguageOrPanel :createSearchForm:numberDisplayPanel" />
                                                        </p:selectOneMenu>
                                                    </h:panelGrid>  

                                                    <p:commandButton process="@parent" disabled="#{createSearchBean.languageOrCollector.language==null and createSearchBean.languageOrCollector.minimumLanguageLevel==null and createSearchBean.languageOrCollector.requiredVideo==null}" styleClass="formButton" id="butonAddOrLanguage" value="#{messages.Add}" update="languageOrInfoPanel @parent"  
                                                                     actionListener="#{createSearchBean.addSearchLanguageInfoRequerimentOrOperator()}" >  
                                                    </p:commandButton>
                                                </div>

                                                <p:outputPanel style="width:100%;text-align: center;" id="languageOrInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.OrOperatorTitle}" id="selectedOrLanguageInfo" var="selectedOrLanguageInfo" value="#{createSearchBean.search.searchLanguageInfoRequerimentOrOperatorList}" >
                                                        <p:column headerText="#{messages.Language}" style="width:40%">  
                                                            <h:outputText value="#{languageBundle[selectedOrLanguageInfo.language.idLanguage.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.MinimumLanguageLevel}" style="width:40%">  
                                                            <h:outputText value="#{languageLevelBundle[selectedOrLanguageInfo.minimumLanguageLevel.idLanguageLevel.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.RequiredVideo}" style="width:10%">
                                                            <h:outputText rendered="#{selectedOrLanguageInfo.requiredVideo==true}" value="#{messages.Yes}" />
                                                            <h:outputText rendered="#{selectedOrLanguageInfo.requiredVideo==false}" value="#{messages.No}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromLanguageOrList(selectedOrLanguageInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedLanguageAccordionPanel:advancedLanguageOrPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedLanguageAccordionPanel:advancedLanguageOrPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>
                                        <p:tab titleStyleClass="languageBackgroundButton advancedOptionTab" id="languageAndOperatorTab" title="#{messages.AndOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedLanguageAndPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedLanguageAndPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.LanguageRequired}" converter="#{languageConverter}" id="selectAndLanguage" value="#{createSearchBean.languageAndCollector.language}" effect="fade" label="#{messages.Language}">  
                                                            <f:selectItem itemLabel="#{messages.Language}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.languages}" var="languageAnd" itemLabel="#{languageBundle[languageAnd.idLanguage.toString()]}" itemValue="#{languageAnd}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedLanguageAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu required="false" requiredMessage="#{messages.LanguageLevelRequired}" converter="#{languageLevelConverter}" id="selectMinimumAndLanguageLevel" value="#{createSearchBean.languageAndCollector.minimumLanguageLevel}" effect="fade" label="#{messages.LanguageLevel}">  
                                                            <f:selectItem itemLabel="#{messages.MinimumLanguageLevel}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.languageLevels}" var="minimumAndLanguageLevel" itemLabel="#{languageLevelBundle[minimumAndLanguageLevel.idLanguageLevel.toString()]}" itemValue="#{minimumAndLanguageLevel}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedLanguageAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu id="selectAndRequiredVideo" value="#{createSearchBean.languageAndCollector.requiredVideo}" effect="fade" required="false" label="#{messages.RequiredVideo}" requiredMessage="#{messages.RequiredVideo}">  
                                                            <f:selectItem itemLabel="#{messages.RequiredVideo}" itemValue="#{null}" />
                                                            <f:selectItem itemLabel="#{messages.Yes}" itemValue="#{true}" />
                                                            <f:selectItem itemLabel="#{messages.No}" itemValue="#{false}" />
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedLanguageAndPanel :createSearchForm:numberDisplayPanel" />
                                                        </p:selectOneMenu>
                                                    </h:panelGrid>  

                                                    <p:commandButton process="@parent" disabled="#{createSearchBean.languageAndCollector.language==null and createSearchBean.languageAndCollector.minimumLanguageLevel==null and createSearchBean.languageAndCollector.requiredVideo==null}" styleClass="formButton" id="butonAddAndLanguage" value="#{messages.Add}" update="languageAndInfoPanel @parent"  
                                                                     actionListener="#{createSearchBean.addSearchLanguageInfoRequerimentAndOperator()}" >
                                                    </p:commandButton>    
                                                </div>

                                                <p:outputPanel style="width:100%;text-align: center;" id="languageAndInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.AndOperatorTitle}" id="selectedAndLanguageInfo" var="selectedAndLanguageInfo" value="#{createSearchBean.search.searchLanguageInfoRequerimentAndOperatorList}" >
                                                        <p:column headerText="#{messages.Language}" style="width:40%">  
                                                            <h:outputText value="#{languageBundle[selectedAndLanguageInfo.language.idLanguage.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.MinimumLanguageLevel}" style="width:40%">  
                                                            <h:outputText value="#{languageLevelBundle[selectedAndLanguageInfo.minimumLanguageLevel.idLanguageLevel.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.RequiredVideo}" style="width:10%">
                                                            <h:outputText value="#{selectedAndLanguageInfo.requiredVideo}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromLanguageAndList(selectedAndLanguageInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedLanguageAccordionPanel:advancedLanguageAndPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedLanguageAccordionPanel:advancedLanguageAndPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>
                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>
                                    </p:accordionPanel>
                                </p:tab>

                                <p:tab id="advancedProfessionalTab" title="#{messages.ProfessionalRequeriments}">
                                     <p:accordionPanel activeIndex="false" id="advancedProfessionalAccordionPanel">
                                        <p:tab titleStyleClass="professionalBackgroundButton advancedOptionTab" id="professionalOrOperatorTab" title="#{messages.OrOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedProfessionalOrPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedProfessionalOrPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.SectorRequired}" converter="#{sectorConverter}" id="selectOrProfessionalSector" value="#{createSearchBean.professionalOrCollector.sector}" effect="fade" label="#{messages.Sector}">  
                                                            <f:selectItem itemLabel="#{messages.Sector}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.sectors}" var="professionalOrSector" itemLabel="#{sectorBundle[professionalOrSector.idSector.toString()]}" itemValue="#{professionalOrSector}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedProfessionalOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.JobPositionRequired}" converter="#{jobPositionConverter}" id="selectProfessionalOrJobPosition" value="#{createSearchBean.professionalOrCollector.jobPosition}" effect="fade" label="#{messages.JobPosition}">  
                                                            <f:selectItem itemLabel="#{messages.JobPosition}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.jobPositions}" var="professionalOrJobPosition" itemLabel="#{jobPositionBundle[professionalOrJobPosition.idJobPosition.toString()]}" itemValue="#{professionalOrJobPosition}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedProfessionalOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu required="false" requiredMessage="#{messages.JobDurationRequired}" converter="#{jobDurationConverter}" id="selectProfessionalOrMinimumJobDuration" value="#{createSearchBean.professionalOrCollector.minimumJobDuration}" effect="fade" label="#{messages.MinimumJobDuration}">  
                                                            <f:selectItem itemLabel="#{messages.MinimumJobDuration}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.jobDurations}" var="professionalOrMinimumJobDuration" itemLabel="#{jobDurationBundle[professionalOrMinimumJobDuration.idJobDuration.toString()]}" itemValue="#{professionalOrMinimumJobDuration}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedProfessionalOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                    </h:panelGrid>  

                                                    <p:commandButton process="@parent" disabled="#{createSearchBean.professionalOrCollector.sector==null and createSearchBean.professionalOrCollector.jobPosition==null and createSearchBean.professionalOrCollector.minimumJobDuration==null}" styleClass="formButton" id="butonAddProfessionalOr" value="#{messages.Add}" update="professionalOrInfoPanel @parent :createSearchForm:numberDisplayPanel" actionListener="#{createSearchBean.addSearchProfessionalInfoRequerimentOrOperator()}">
                                                    </p:commandButton>    
                                                </div>

                                                <p:outputPanel style="width:100%;text-align: center;" id="professionalOrInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.OrOperatorTitle}" id="selectedOrProfessionalInfo" var="selectedOrProfessionalInfo" value="#{createSearchBean.search.searchProfessionalInfoRequerimentOrOperatorList}" >
                                                        <p:column headerText="#{messages.Sector}" style="width:40%">  
                                                            <h:outputText value="#{sectorBundle[selectedOrProfessionalInfo.sector.idSector.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.JobPosition}" style="width:40%">  
                                                            <h:outputText value="#{jobPositionBundle[selectedOrProfessionalInfo.jobPosition.idJobPosition.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.MinimumJobDuration}" style="width:10%">
                                                            <h:outputText value="#{jobDurationBundle[selectedOrProfessionalInfo.minimumJobDuration.idJobDuration.toString()]}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromProfessionalOrList(selectedOrProfessionalInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedProfessionalAccordionPanel:advancedProfessionalOrPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedProfessionalAccordionPanel:advancedProfessionalOrPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>

                                        <p:tab titleStyleClass="professionalBackgroundButton advancedOptionTab" id="professionalAndOperatorTab" title="#{messages.AndOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedProfessionalAndPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedProfessionalAndPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.SectorRequired}" converter="#{sectorConverter}" id="selectAndProfessionalSector" value="#{createSearchBean.professionalAndCollector.sector}" effect="fade" label="#{messages.Sector}">  
                                                            <f:selectItem itemLabel="#{messages.Sector}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.sectors}" var="professionalAndSector" itemLabel="#{sectorBundle[professionalAndSector.idSector.toString()]}" itemValue="#{professionalAndSector}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedProfessionalAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.JobPositionRequired}" converter="#{jobPositionConverter}" id="selectProfessionalAndJobPosition" value="#{createSearchBean.professionalAndCollector.jobPosition}" effect="fade" label="#{messages.JobPosition}">  
                                                            <f:selectItem itemLabel="#{messages.JobPosition}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.jobPositions}" var="professionalAndJobPosition" itemLabel="#{jobPositionBundle[professionalAndJobPosition.idJobPosition.toString()]}" itemValue="#{professionalAndJobPosition}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedProfessionalAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu required="false" requiredMessage="#{messages.JobDurationRequired}" converter="#{jobDurationConverter}" id="selectProfessionalAndMinimumJobDuration" value="#{createSearchBean.professionalAndCollector.minimumJobDuration}" effect="fade" label="#{messages.MinimumJobDuration}">  
                                                            <f:selectItem itemLabel="#{messages.MinimumJobDuration}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.jobDurations}" var="professionalAndMinimumJobDuration" itemLabel="#{jobDurationBundle[professionalAndMinimumJobDuration.idJobDuration.toString()]}" itemValue="#{professionalAndMinimumJobDuration}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedProfessionalAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                    </h:panelGrid>  

                                                    <p:commandButton  process="@parent" disabled="#{createSearchBean.professionalAndCollector.sector==null and createSearchBean.professionalAndCollector.jobPosition==null and createSearchBean.professionalAndCollector.minimumJobDuration==null}" styleClass="formButton" id="butonAddProfessionalAnd" value="#{messages.Add}" update="professionalAndInfoPanel @parent :createSearchForm:numberDisplayPanel"  
                                                                     actionListener="#{createSearchBean.addSearchProfessionalInfoRequerimentAndOperator()}" >
                                                    </p:commandButton>    
                                                </div>

                                                <p:outputPanel style="width:100%;text-align: center;" id="professionalAndInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.AndOperatorTitle}" id="selectedAndProfessionalInfo" var="selectedAndProfessionalInfo" value="#{createSearchBean.search.searchProfessionalInfoRequerimentAndOperatorList}" >
                                                        <p:column headerText="#{messages.Sector}" style="width:40%">  
                                                            <h:outputText value="#{sectorBundle[selectedAndProfessionalInfo.sector.idSector.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.JobPosition}" style="width:40%">  
                                                            <h:outputText value="#{jobPositionBundle[selectedAndProfessionalInfo.jobPosition.idJobPosition.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.MinimumJobDuration}" style="width:10%">
                                                            <h:outputText value="#{jobDurationBundle[selectedAndProfessionalInfo.minimumJobDuration.idJobDuration.toString()]}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromProfessionalAndList(selectedAndProfessionalInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedProfessionalAccordionPanel:advancedProfessionalAndPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedProfessionalAccordionPanel:advancedProfessionalAndPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>
                                     </p:accordionPanel>

                                </p:tab>

                                <p:tab id="advancedEducationalTab" title="#{messages.EducationalRequeriments}">
                                    <p:accordionPanel activeIndex="false" id="advancedEducationalAccordionPanel">                                   
                                        <p:tab titleStyleClass="educationalBackgroundButton advancedOptionTab" id="educationalOrOperatorTab" title="#{messages.OrOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedEducationalOrPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedEducationalOrPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu required="false" requiredMessage="#{messages.EducationalLevelRequired}" converter="#{educationalLevelConverter}" id="selectEducationalOrMinimumEducationalLevel" value="#{createSearchBean.educationalOrCollector.minimumEducationalLevel}" effect="fade" label="#{messages.MinimumEducationalLevel}">  
                                                            <f:selectItem itemLabel="#{messages.MinimumEducationalLevel}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.educationalLevels}" var="educationalOrMinimumEducationalLevel" itemLabel="#{educationalLevelBundle[educationalOrMinimumEducationalLevel.idEducationalLevel.toString()]}" itemValue="#{educationalOrMinimumEducationalLevel}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedEducationalOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" rendered="#{createSearchBean.educationalOrCollector.minimumEducationalLevel==null or createSearchBean.educationalOrCollector.minimumEducationalLevel.educationalValue>2}" required="false" requiredMessage="#{messages.SectorRequired}" converter="#{sectorConverter}" id="selectOrEducationalSector" value="#{createSearchBean.educationalOrCollector.sector}" effect="fade" label="#{messages.Sector}">  
                                                            <f:selectItem itemLabel="#{messages.Sector}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.sectors}" var="educationalOrSector" itemLabel="#{sectorBundle[educationalOrSector.idSector.toString()]}" itemValue="#{educationalOrSector}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedEducationalOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>
                                                    </h:panelGrid>  
                                                    <p:commandButton  process="@parent" disabled="#{createSearchBean.educationalOrCollector.sector==null and createSearchBean.educationalOrCollector.minimumEducationalLevel==null}" styleClass="formButton" id="butonAddEducationalOr" value="#{messages.Add}" update="educationalOrInfoPanel @parent :createSearchForm:numberDisplayPanel" actionListener="#{createSearchBean.addSearchEducationalInfoRequerimentOrOperator()}"></p:commandButton>    
                                                </div>

                                                <p:outputPanel style="width:100%;text-align: center;" id="educationalOrInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.OrOperatorTitle}" id="selectedOrEducationalInfo" var="selectedOrEducationalInfo" value="#{createSearchBean.search.searchEducationalInfoRequerimentOrOperatorList}" >
                                                        <p:column headerText="#{messages.Sector}" style="width:45%">  
                                                            <h:outputText value="#{sectorBundle[selectedOrEducationalInfo.sector.idSector.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.MinimumEducationalLevel}" style="width:45%">
                                                            <h:outputText value="#{educationalLevelBundle[selectedOrEducationalInfo.minimumEducationalLevel.idEducationalLevel.toString()]}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromEducationalOrList(selectedOrEducationalInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedEducationalAccordionPanel:advancedEducationalOrPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedEducationalAccordionPanel:advancedEducationalOrPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>

                                        <p:tab titleStyleClass="educationalBackgroundButton advancedOptionTab" id="educationalAndOperatorTab" title="#{messages.AndOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedEducationalAndPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedEducationalAndPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu required="false" requiredMessage="#{messages.EducationalLevelRequired}" converter="#{educationalLevelConverter}" id="selectEducationalAndMinimumEducationalLevel" value="#{createSearchBean.educationalAndCollector.minimumEducationalLevel}" effect="fade" label="#{messages.MinimumEducationalLevel}">  
                                                            <f:selectItem itemLabel="#{messages.MinimumEducationalLevel}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.educationalLevels}" var="educationalAndMinimumEducationalLevel" itemLabel="#{educationalLevelBundle[educationalAndMinimumEducationalLevel.idEducationalLevel.toString()]}" itemValue="#{educationalAndMinimumEducationalLevel}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedEducationalAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" rendered="#{createSearchBean.educationalAndCollector.minimumEducationalLevel==null or createSearchBean.educationalAndCollector.minimumEducationalLevel.educationalValue>2}" required="false" requiredMessage="#{messages.SectorRequired}" converter="#{sectorConverter}" id="selectAndEducationalSector" value="#{createSearchBean.educationalAndCollector.sector}" effect="fade" label="#{messages.Sector}">  
                                                            <f:selectItem itemLabel="#{messages.Sector}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.sectors}" var="educationalAndSector" itemLabel="#{sectorBundle[educationalAndSector.idSector.toString()]}" itemValue="#{educationalAndSector}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedEducationalAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>                                                             
                                                    </h:panelGrid>  

                                                    <p:commandButton  process="@parent" disabled="#{createSearchBean.educationalAndCollector.sector==null and createSearchBean.educationalAndCollector.minimumEducationalLevel==null}" styleClass="formButton" id="butonAddEducationalAnd" value="#{messages.Add}" update="educationalAndInfoPanel @parent :createSearchForm:numberDisplayPanel" actionListener="#{createSearchBean.addSearchEducationalInfoRequerimentAndOperator()}"></p:commandButton>    
                                                </div>

                                                <p:outputPanel style="width:100%;text-align: center;" id="educationalAndInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.AndOperatorTitle}" id="selectedAndEducationalInfo" var="selectedAndEducationalInfo" value="#{createSearchBean.search.searchEducationalInfoRequerimentAndOperatorList}" >
                                                        <p:column headerText="#{messages.Sector}" style="width:45%">  
                                                            <h:outputText value="#{sectorBundle[selectedAndEducationalInfo.sector.idSector.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.MinimumEducationalLevel}" style="width:45%">
                                                            <h:outputText value="#{educationalLevelBundle[selectedAndEducationalInfo.minimumEducationalLevel.idEducationalLevel.toString()]}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromEducationalAndList(selectedAndEducationalInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedEducationalAccordionPanel:advancedEducationalAndPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedEducationalAccordionPanel:advancedEducationalAndPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>
                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>
                                    </p:accordionPanel>
                                </p:tab>

                                <p:tab id="advancedRelocatingTab" title="#{messages.RelocatingRequeriments}">
                                    <p:accordionPanel activeIndex="false" id="advancedRelocatingAccordionPanel">                                   
                                        <p:tab titleStyleClass="relocatingBackgroundButton advancedOptionTab" id="relocatingOrOperatorTab" title="#{messages.OrOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedRelocatingOrPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedRelocatingOrPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu required="false" filter="true" filterMatchMode="contains" requiredMessage="#{messages.CountryRequired}" converter="#{countryConverter}" id="selectRelocatingOrCountry" value="#{createSearchBean.relocatingOrCollector.country}" effect="fade" label="#{messages.CountryText}">  
                                                            <f:selectItem itemLabel="#{messages.CountryText}" itemValue="" />  
                                                            <f:selectItem itemLabel="#{countryBundle[resourcesBean.spain.idCountry.toString()]}" itemValue="#{resourcesBean.spain}" /> 
                                                            <f:selectItems value="#{userResourcesBean.countries}" var="relocatingOrCountry" itemLabel="#{countryBundle[relocatingOrCountry.idCountry.toString()]}" itemValue="#{relocatingOrCountry}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedRelocatingOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" rendered="#{createSearchBean.relocatingOrCollector.country!=null}" required="false" requiredMessage="#{messages.ProvinceRequired}" converter="#{provinceConverter}" id="selectOrProvince" value="#{createSearchBean.relocatingOrCollector.province}" effect="fade" label="#{messages.ProvinceText}">  
                                                            <f:selectItem itemLabel="#{messages.AnyProvince}" itemValue="" />  
                                                            <f:selectItems value="#{createSearchBean.relocatingOrCollector.country.provinceList}" var="relocatingOrProvince" itemLabel="#{relocatingOrProvince.description}" itemValue="#{relocatingOrProvince}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedRelocatingOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>
                                                    </h:panelGrid>  
                                                    <p:commandButton  process="@parent" disabled="#{createSearchBean.relocatingOrCollector.country==null and createSearchBean.relocatingOrCollector.province==null}" styleClass="formButton" id="butonAddRelocatingOr" value="#{messages.Add}" update="relocatingOrInfoPanel @parent :createSearchForm:numberDisplayPanel" actionListener="#{createSearchBean.addSearchRelocatingInfoRequerimentOrOperator()}"></p:commandButton>    
                                                </div>
                                                <p:outputPanel style="width:100%;text-align: center;" id="relocatingOrInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.OrOperatorTitle}" id="selectedOrRelocatingInfo" var="selectedOrRelocatingInfo" value="#{createSearchBean.search.searchRelocatingInfoRequerimentOrOperatorList}" >
                                                        <p:column headerText="#{messages.CountryText}" style="width:45%">  
                                                            <h:outputText value="#{countryBundle[selectedOrRelocatingInfo.country.idCountry.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.ProvinceText}" style="width:45%">
                                                            <h:outputText rendered="#{selectedOrRelocatingInfo.province==null}" value="#{messages.AnyProvince}" />                                                                
                                                            <h:outputText rendered="#{selectedOrRelocatingInfo.province!=null}" value="#{selectedOrRelocatingInfo.province.description}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromRelocatingOrList(selectedOrRelocatingInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedRelocatingAccordionPanel:advancedRelocatingOrPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedRelocatingAccordionPanel:advancedRelocatingOrPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>

                                        <p:tab titleStyleClass="relocatingBackgroundButton advancedOptionTab" id="relocatingAndOperatorTab" title="#{messages.AndOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedRelocatingAndPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedRelocatingAndPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu required="false" filter="true" filterMatchMode="contains" requiredMessage="#{messages.CountryRequired}" converter="#{countryConverter}" id="selectRelocatingAndCountry" value="#{createSearchBean.relocatingAndCollector.country}" effect="fade" label="#{messages.CountryText}">  
                                                            <f:selectItem itemLabel="#{messages.CountryText}" itemValue="" />  
                                                            <f:selectItem itemLabel="#{countryBundle[resourcesBean.spain.idCountry.toString()]}" itemValue="#{resourcesBean.spain}" /> 
                                                            <f:selectItems value="#{userResourcesBean.countries}" var="relocatingAndCountry" itemLabel="#{countryBundle[relocatingAndCountry.idCountry.toString()]}" itemValue="#{relocatingAndCountry}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedRelocatingAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" rendered="#{createSearchBean.relocatingAndCollector.country!=null}" required="false" requiredMessage="#{messages.ProvinceRequired}" converter="#{provinceConverter}" id="selectAndProvince" value="#{createSearchBean.relocatingAndCollector.province}" effect="fade" label="#{messages.ProvinceText}">  
                                                            <f:selectItem itemLabel="#{messages.AnyProvince}" itemValue="" />  
                                                            <f:selectItems value="#{createSearchBean.relocatingAndCollector.country.provinceList}" var="relocatingAndProvince" itemLabel="#{relocatingAndProvince.description}" itemValue="#{relocatingAndProvince}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedRelocatingAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>
                                                    </h:panelGrid>  
                                                    <p:commandButton process="@parent" disabled="#{createSearchBean.relocatingAndCollector.country==null and createSearchBean.relocatingAndCollector.province==null}" styleClass="formButton" id="butonAddRelocatingAnd" value="#{messages.Add}" update="relocatingAndInfoPanel @parent :createSearchForm:numberDisplayPanel"  
                                                                     actionListener="#{createSearchBean.addSearchRelocatingInfoRequerimentAndOperator()}" >
                                                    </p:commandButton>    
                                                </div>
                                                <p:outputPanel style="width:100%;text-align: center;" id="relocatingAndInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.AndOperatorTitle}" id="selectedAndRelocatingInfo" var="selectedAndRelocatingInfo" value="#{createSearchBean.search.searchRelocatingInfoRequerimentAndOperatorList}" >
                                                        <p:column headerText="#{messages.CountryText}" style="width:45%">  
                                                            <h:outputText value="#{countryBundle[selectedAndRelocatingInfo.country.idCountry.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.ProvinceText}" style="width:45%">
                                                            <h:outputText rendered="#{selectedAndRelocatingInfo.province==null}" value="#{messages.AnyProvince}" />                                                                
                                                            <h:outputText rendered="#{selectedAndRelocatingInfo.province!=null}" value="#{selectedAndRelocatingInfo.province.description}" />
                                                        </p:column>    

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromRelocatingAndList(selectedAndRelocatingInfo)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedRelocatingAccordionPanel:advancedRelocatingAndPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedRelocatingAccordionPanel:advancedRelocatingAndPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>
                                    </p:accordionPanel>
                                </p:tab>

                                <p:tab id="advancedInterestTab" title="#{messages.InterestRequeriments}">
                                    <p:accordionPanel activeIndex="false" id="advancedInterestAccordionPanel">                                   
                                        <p:tab titleStyleClass="interestBackgroundButton advancedOptionTab" id="interestOrOperatorTab" title="#{messages.OrOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedInterestOrPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedInterestOrPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.SectorRequired}" converter="#{sectorConverter}" id="selectInterestOrSector" value="#{createSearchBean.interestAreaOrCollector.sector}" effect="fade" label="#{messages.Sector}">  
                                                            <f:selectItem itemLabel="#{messages.Sector}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.sectors}" var="interestOrSector" itemLabel="#{sectorBundle[interestOrSector.idSector.toString()]}" itemValue="#{interestOrSector}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedInterestOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu required="false" requiredMessage="#{messages.JobPositionRequired}" converter="#{jobPositionConverter}" id="selectInterestOrJobPosition" value="#{createSearchBean.interestAreaOrCollector.jobPosition}" effect="fade" label="#{messages.JobPosition}">  
                                                            <f:selectItem itemLabel="#{messages.JobPosition}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.jobPositions}" var="interestOrJobPosition" itemLabel="#{jobPositionBundle[interestOrJobPosition.idJobPosition.toString()]}" itemValue="#{interestOrJobPosition}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedInterestOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu required="false" converter="#{desiredSalaryConverter}" id="selectInterestOrMaximumDesiredSalary" value="#{createSearchBean.interestAreaOrCollector.maximumDesiredSalary}" effect="fade" label="#{messages.MaximumSalary}">  
                                                            <f:selectItem itemLabel="#{messages.MaximumSalary}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.desiredSalaries}" var="interestOrMaximumDesiredSalary" itemLabel="#{interestOrMaximumDesiredSalary.description}" itemValue="#{interestOrMaximumDesiredSalary}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedInterestOrPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>
                                                    </h:panelGrid>  
                                                    <p:commandButton  process="@parent" disabled="#{createSearchBean.interestAreaOrCollector.sector==null and createSearchBean.interestAreaOrCollector.jobPosition==null and createSearchBean.interestAreaOrCollector.maximumDesiredSalary==null}" styleClass="formButton" id="butonAddInterestOr" value="#{messages.Add}" update="interestOrInfoPanel @parent :createSearchForm:numberDisplayPanel"  
                                                                     actionListener="#{createSearchBean.addSearchInterestAreaRequerimentOrOperator()}" >
                                                    </p:commandButton>    
                                                </div>
                                                <p:outputPanel style="width:100%;text-align: center;" id="interestOrInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.OrOperatorTitle}" id="selectedOrInterest" var="selectedOrInterest" value="#{createSearchBean.search.searchInterestAreaRequerimentOrOperatorList}" >
                                                        <p:column headerText="#{messages.Sector}" style="width:30%">  
                                                            <h:outputText value="#{sectorBundle[selectedOrInterest.sector.idSector.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.JobPosition}" style="width:30%">
                                                            <h:outputText value="#{jobPositionBundle[selectedOrInterest.jobPosition.idJobPosition.toString()]}" />                                                                
                                                        </p:column>    

                                                        <p:column headerText="#{messages.MaximumSalary}" style="width:30%">
                                                            <h:outputText value="#{selectedOrInterest.maximumDesiredSalary.description}" />                                                                
                                                        </p:column>

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromInterestOrList(selectedOrInterest)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedInterestAccordionPanel:advancedInterestOrPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedInterestAccordionPanel:advancedInterestOrPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>

                                        <p:tab titleStyleClass="interestBackgroundButton advancedOptionTab" id="interestAndOperatorTab" title="#{messages.AndOperatorTitle}">
                                            <p:panel styleClass="createCandidatePanel" id="advancedInterestAndPanel">  
                                                <div class="listGrid">
                                                    <h:panelGrid id="advancedInterestAndPanelGrid" styleClass="createCandidatePanelGrid" columns="1">  
                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.SectorRequired}" converter="#{sectorConverter}" id="selectInterestAndSector" value="#{createSearchBean.interestAreaAndCollector.sector}" effect="fade" label="#{messages.Sector}">  
                                                            <f:selectItem itemLabel="#{messages.Sector}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.sectors}" var="interestAndSector" itemLabel="#{sectorBundle[interestAndSector.idSector.toString()]}" itemValue="#{interestAndSector}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedInterestAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu filter="true" filterMatchMode="contains" required="false" requiredMessage="#{messages.JobPositionRequired}" converter="#{jobPositionConverter}" id="selectInterestAndJobPosition" value="#{createSearchBean.interestAreaAndCollector.jobPosition}" effect="fade" label="#{messages.JobPosition}">  
                                                            <f:selectItem itemLabel="#{messages.JobPosition}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.jobPositions}" var="interestAndJobPosition" itemLabel="#{jobPositionBundle[interestAndJobPosition.idJobPosition.toString()]}" itemValue="#{interestAndJobPosition}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedInterestAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>

                                                        <p:selectOneMenu required="false" converter="#{desiredSalaryConverter}" id="selectInterestAndMaximumDesiredSalary" value="#{createSearchBean.interestAreaAndCollector.maximumDesiredSalary}" effect="fade" label="#{messages.MaximumSalary}">  
                                                            <f:selectItem itemLabel="#{messages.MaximumSalary}" itemValue="" />  
                                                            <f:selectItems value="#{userResourcesBean.desiredSalaries}" var="interestAndMaximumDesiredSalary" itemLabel="#{interestAndMaximumDesiredSalary.description}" itemValue="#{interestAndMaximumDesiredSalary}"/>  
                                                            <p:ajax listener="#{createSearchBean.updateNumberOfValidCandidates()}" event="change" update="advancedInterestAndPanel :createSearchForm:numberDisplayPanel"/>
                                                        </p:selectOneMenu>
                                                    </h:panelGrid>  
                                                    <p:commandButton  process="@parent" disabled="#{createSearchBean.interestAreaAndCollector.sector==null and createSearchBean.interestAreaAndCollector.jobPosition==null and createSearchBean.interestAreaAndCollector.maximumDesiredSalary==null}" styleClass="formButton" id="butonAddInterestAnd" value="#{messages.Add}" update="interestAndInfoPanel @parent :createSearchForm:numberDisplayPanel"  
                                                                     actionListener="#{createSearchBean.addSearchInterestAreaRequerimentAndOperator()}" >
                                                    </p:commandButton>    
                                                </div>
                                                <p:outputPanel style="width:100%;text-align: center;" id="interestAndInfoPanel">
                                                    <p:dataTable emptyMessage="#{messages.AndOperatorTitle}" id="selectedAndInterest" var="selectedAndInterest" value="#{createSearchBean.search.searchInterestAreaRequerimentAndOperatorList}" >
                                                        <p:column headerText="#{messages.Sector}" style="width:30%">  
                                                            <h:outputText value="#{sectorBundle[selectedAndInterest.sector.idSector.toString()]}" />  
                                                        </p:column>

                                                        <p:column headerText="#{messages.JobPosition}" style="width:30%">
                                                            <h:outputText value="#{jobPositionBundle[selectedAndInterest.jobPosition.idJobPosition.toString()]}" />                                                                
                                                        </p:column>    

                                                        <p:column headerText="#{messages.MaximumSalary}" style="width:30%">
                                                            <h:outputText value="#{selectedAndInterest.maximumDesiredSalary.description}" />                                                                
                                                        </p:column>

                                                        <p:column style="width:10%">  
                                                            <p:commandButton actionListener="#{createSearchBean.removeFromInterestAndList(selectedAndInterest)}" styleClass="deleteButton" update=":createSearchForm:createSearchAccordionPanel:advancedInterestAccordionPanel:advancedInterestAndPanel :createSearchForm:numberDisplayPanel" process=":createSearchForm:createSearchAccordionPanel:advancedInterestAccordionPanel:advancedInterestAndPanel" icon="ui-icon-close">  
                                                            </p:commandButton> 
                                                        </p:column>

                                                    </p:dataTable>
                                                </p:outputPanel>
                                            </p:panel>
                                        </p:tab>
                                    </p:accordionPanel>
                                </p:tab>
                            </p:tabView>
                        </p:panel>
                    </p:panel>
                    
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
